home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat1 / rand.1 < prev    next >
Text File  |  1999-09-16  |  938b  |  67 lines

  1.  
  2.  
  3.  
  4. rand(1)                        Scilab Function                        rand(1)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   rand - random number generator
  13.  
  14. CALLING SEQUENCE
  15.   rand(m,n)
  16.   rand(x)
  17.   rand('key'[,n])
  18.  
  19. DESCRIPTION
  20.   random matrix generator.
  21.  
  22.   rand(m,n)           is a random matrix of dimension mxn.
  23.  
  24.   rand(a)             is a random matrix of same size as a.
  25.  
  26.   rand('uniform')     is for uniform random numbers.
  27.  
  28.   rand('normal')      is for gaussian random numbers.
  29.  
  30.   rand('seed')        returns the current value of the seed.
  31.  
  32.   rand('seed',n)      puts the seed to n. (n=0 at first call).
  33.  
  34.  
  35.   rand : with no arguments gives a scalar whose value changes each time it is
  36.   referenced.  By default, random numbers are uniformly distributed in the
  37.   interval (0,1). rand('normal') switches to a normal distribution with mean
  38.   0 and variance 1.  rand('uniform') switches back to the uniform distribu-
  39.   tion.
  40.  
  41. SEE ALSO
  42.   ssrand
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.